import request from '@/utils/request'

// 查询课程时间列表
export function listTimetable(query) {
  return request({
    url: '/course/timetable/list',
    method: 'get',
    params: query
  })
}

// 查询课程时间详细
export function getTimetable(timetableId) {
  return request({
    url: '/course/timetable/' + timetableId,
    method: 'get'
  })
}

// 新增课程时间
export function addTimetable(data) {
  return request({
    url: '/course/timetable',
    method: 'post',
    data: data
  })
}

// 修改课程时间
export function updateTimetable(data) {
  return request({
    url: '/course/timetable',
    method: 'put',
    data: data
  })
}

// 删除课程时间
export function delTimetable(timetableId) {
  return request({
    url: '/course/timetable/' + timetableId,
    method: 'delete'
  })
}

// 导出课程时间
export function exportTimetable(query) {
  return request({
    url: '/course/timetable/export',
    method: 'get',
    params: query
  })
}